From: Chong Yidong Date: Mon, 8 Feb 2010 23:27:29 +0000 (-0500) Subject: Fix ada-mode handling of number literals. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~8574 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=468ef8f80882e30163475ca320faa42993158e23;p=emacs.git Fix ada-mode handling of number literals. * progmodes/ada-mode.el (ada-in-numeric-literal-p): New function. (ada-adjust-case): Don't adjust case in hexadecimal number literals. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d16d7cf49bf..61c72b693d2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-02-08 Jose E. Marchesi + + * progmodes/ada-mode.el (ada-in-numeric-literal-p): New function. + (ada-adjust-case): Don't adjust case in hexadecimal number + literals. + 2010-02-08 Kenichi Handa * international/mule-util.el (with-coding-priority): Add autoload diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index a08e31e2016..95f9f6babf3 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -1017,6 +1017,9 @@ If PARSE-RESULT is non-nil, use it instead of calling `parse-partial-sexp'." (line-beginning-position) (point)))) (or (ada-in-string-p parse-result) (ada-in-comment-p parse-result))) +(defsubst ada-in-numeric-literal-p () + "Return t if point is after a prefix of a numeric literal." + (looking-back "\\([0-9]+#[0-9a-fA-F_]+\\)")) ;;------------------------------------------------------------------ ;; Contextual menus @@ -1606,6 +1609,8 @@ If FORCE-IDENTIFIER is non-nil then also adjust keyword as identifier." (eq (char-syntax (char-before)) ?w) ;; if in a string or a comment (not (ada-in-string-or-comment-p)) + ;; if in a numeric literal + (not (ada-in-numeric-literal-p)) ) (if (save-excursion (forward-word -1)